package com.example.tse.rbhttpservice.service.shopping;

import com.example.tse.rbhttpservice.service.shopping.model.ShoppingAddRequest;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingAddResponse;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingChangeRequest;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingChangeResponse;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingCheckConsigneeRequest;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingCheckConsigneeResponse;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingCheckGoodsSpecRequest;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingCheckGoodsSpecResponse;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingChooseRequest;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingChooseResponse;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingCommitRequest;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingCommitResponse;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingDevideRequest;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingDevideResponse;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingGetCouponListRequest;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingGetCouponListResponse;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingGetForBuyRequest;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingGetForBuyResponse;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingGetPriceRequest;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingGetPriceResponse;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingGetRequest;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingGetResponse;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingGetSubOrderListRequest;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingGetSubOrderListResponse;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingGetPrePayIdRequest;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingGetPrePayIdResponse;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingGetCartNumRequest;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingGetCartNumResponse;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingRemoveRequest;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingRemoveResponse;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingSetAddrNumRequest;
import com.example.tse.rbhttpservice.service.shopping.model.ShoppingSetAddrNumResponse;
import  com.example.tse.rbhttpservice.service.RemoteServiceListenerT;

/**
*
* @author wliu
*  edit   tse
*/
public interface ShoppingService {
/**
* 添加购物车
* @param request
* @param listener
* @return ShoppingAddResponse
*/
void add(ShoppingAddRequest request, RemoteServiceListenerT
        <ShoppingAddResponse> listener);

/**
* 更改购物车中某商品数量，已选中的商品在每次更改数量之后都需要重新计算关税小计和总计价格
* @param request
* @param listener
* @return ShoppingChangeResponse
*/
void change(ShoppingChangeRequest request, RemoteServiceListenerT
        <ShoppingChangeResponse> listener);

/**
* 校验收货人的身份证号码是否在黑名单中，不在黑名单中才可以继续下单，否则提示相关信息
* @param request
* @param listener
* @return ShoppingCheckConsigneeResponse
*/
void checkConsignee(ShoppingCheckConsigneeRequest request, RemoteServiceListenerT
        <ShoppingCheckConsigneeResponse> listener);

/**
* 验证订单中商品规格中仓库名称为上海跨境网仓同时下单地址中没有身份证信息
* @param request
* @param listener
* @return ShoppingCheckGoodsSpecResponse
*/
void checkGoodsSpec(ShoppingCheckGoodsSpecRequest request, RemoteServiceListenerT
        <ShoppingCheckGoodsSpecResponse> listener);

/**
* 购物车中选择某商品，需计算购物车价格，多次点击切换选中状态，全选操作需要前端计算当前需要改变的ID拼接成字符串，若传递了areaId则是某个仓库的全选操作，否则就是所有的全选操作，根据status状态确定当前传递的IDs是选中还是取消
* @param request
* @param listener
* @return ShoppingChooseResponse
*/
void choose(ShoppingChooseRequest request, RemoteServiceListenerT
        <ShoppingChooseResponse> listener);

/**
* 提交订单
* @param request
* @param listener
* @return ShoppingCommitResponse
*/
void commit(ShoppingCommitRequest request, RemoteServiceListenerT
        <ShoppingCommitResponse> listener);

/**
* 购物车点击结算，拆分订单
* @param request
* @param listener
* @return ShoppingDevideResponse
*/
void devide(ShoppingDevideRequest request, RemoteServiceListenerT
        <ShoppingDevideResponse> listener);

/**
* 购物车优惠券列表
* @param request
* @param listener
* @return ShoppingGetCouponListResponse
*/
void getCouponList(ShoppingGetCouponListRequest request, RemoteServiceListenerT
        <ShoppingGetCouponListResponse> listener);

/**
* 获取购物车数据，用于下单页面（购买商品列表、收货地址、配送方式、支付方式、优惠券列表）
* @param request
* @param listener
* @return ShoppingGetForBuyResponse
*/
void getForBuy(ShoppingGetForBuyRequest request, RemoteServiceListenerT
        <ShoppingGetForBuyResponse> listener);

/**
* 在结算界面，选择收货地址、配送方式、支付方式、优惠券都需要重新计算价格
* @param request
* @param listener
* @return ShoppingGetPriceResponse
*/
void getPrice(ShoppingGetPriceRequest request, RemoteServiceListenerT
        <ShoppingGetPriceResponse> listener);

/**
* 获取当前用户的购物车中商品，按仓库组合商品，商品的关税为商品对应的分类的关税，团购的商品限购数量为0时，不能选择该商品，点击选择按钮提示已售罄，商品数量不能更改
* @param request
* @param listener
* @return ShoppingGetResponse
*/
void get(ShoppingGetRequest request, RemoteServiceListenerT
        <ShoppingGetResponse> listener);

/**
* 每次进入拆单页面，都获取拆单后的数据，对于“已生成订单”点击按钮跳转到订单详情
* @param request
* @param listener
* @return ShoppingGetSubOrderListResponse
*/
void getSubOrderList(ShoppingGetSubOrderListRequest request, RemoteServiceListenerT
        <ShoppingGetSubOrderListResponse> listener);

/**
* 获取支付单号，每次点击支付前都需要去获取，每次支付都对应不同的支付单号
* @param request
* @param listener
* @return ShoppingGetPrePayIdResponse
*/
void getPrePayId(ShoppingGetPrePayIdRequest request, RemoteServiceListenerT
        <ShoppingGetPrePayIdResponse> listener);

/**
* 获取购物车数量
* @param request
* @param listener
* @return ShoppingGetCartNumResponse
*/
void getCartNum(ShoppingGetCartNumRequest request, RemoteServiceListenerT
        <ShoppingGetCartNumResponse> listener);

/**
* 删除购物车中的商品，每次删除之后都需要根据当前商品的选择状态重新计算关税小计和价格小计
* @param request
* @param listener
* @return ShoppingRemoveResponse
*/
void remove(ShoppingRemoveRequest request, RemoteServiceListenerT
        <ShoppingRemoveResponse> listener);

/**
* 修改地址身份证信息
* @param request
* @param listener
* @return ShoppingSetAddrNumResponse
*/
void setAddrNum(ShoppingSetAddrNumRequest request, RemoteServiceListenerT
        <ShoppingSetAddrNumResponse> listener);

    }
